package com.ryan.utils;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.apache.log4j.Logger;

public class PropertiesUtil {
	private static Logger logger = Logger.getLogger(PropertiesUtil.class);
	public static void loadProperties(Properties properties,String filePath) {
		try {
			InputStream inputStream = new BufferedInputStream(new FileInputStream(filePath));
			properties.load(inputStream);
		} catch (FileNotFoundException e) {
			logger.error("配置文件《"+filePath+"》没找到！", e);
		} catch (IOException e) {
			logger.error("读取配置文件《"+filePath+"》", e);
		}
	}
}
